package cn.stylefeng.guns.sys.modular.system.db2.mapper;

import cn.stylefeng.guns.sys.modular.system.db2.model.params.BusinessParam;
import cn.stylefeng.guns.sys.modular.system.db2.model.result.BusinessResult;
import cn.stylefeng.guns.sys.modular.system.model.params.ProDataViewParam;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 部门表 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2018-12-07
 */
public interface BusinessMapper {

    Page<BusinessResult> customPageList(@Param("page") Page page, @Param("paramCondition") BusinessParam paramCondition);

    /**
     * 营业收入、就餐人数、客单数
     *
     * @param param
     * @return
     */
    Map<String, Object> findBusinessData(@Param("param") ProDataViewParam param);

    /**
     * 按营业额排序
     *
     * @param param
     * @return
     */
    List<Map<String, Object>> findBusinessDataOrderByIncome(@Param("param") ProDataViewParam param);

    /**
     * 按客流量排序
     *
     * @param param
     * @return
     */
    List<Map<String, Object>> findBusinessDataOrderByPeopleQty(@Param("param") ProDataViewParam param);

    /**
     * 外卖收据
     *
     * @param param
     * @return
     */
    Map<String, Object> findBusinessDataOfTakeAway(@Param("param") ProDataViewParam param);

    /**
     * 大米消耗-就餐人数
     * @param param
     * @return
     */
    List<Map<String, Object>> findPeopleQtyByParam(@Param("param") ProDataViewParam param);

    /**
     * 大米消耗-外卖主食
     * @param param
     * @return
     */
    List<Map<String, Object>> findTakeawayRiceDataByParam(@Param("param") ProDataViewParam param);
}
